package com.example.javapracticaltraining.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName device_maintenance_record
 */
@TableName(value ="device_maintenance_record")
@Data
public class DeviceMaintenanceRecord {
    /**
     * 
     */
    @TableId(value = "record_id", type = IdType.AUTO)
    private Integer recordId;

    /**
     * 
     */
    @TableField(value = "device_id")
    private Integer deviceId;

    /**
     * 
     */
    @TableField(value = "maintenance_date")
    private Date maintenanceDate;

    /**
     * 
     */
    @TableField(value = "maintenance_type")
    private Object maintenanceType;

    /**
     * 
     */
    @TableField(value = "maintenance_content")
    private String maintenanceContent;

    /**
     * 
     */
    @TableField(value = "maintenance_cost")
    private BigDecimal maintenanceCost;

    /**
     * 
     */
    @TableField(value = "maintenance_company")
    private String maintenanceCompany;

    /**
     * 
     */
    @TableField(value = "maintenance_person")
    private String maintenancePerson;

    /**
     * 
     */
    @TableField(value = "maintenance_result")
    private Object maintenanceResult;

    /**
     * 
     */
    @TableField(value = "remarks")
    private String remarks;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DeviceMaintenanceRecord other = (DeviceMaintenanceRecord) that;
        return (this.getRecordId() == null ? other.getRecordId() == null : this.getRecordId().equals(other.getRecordId()))
            && (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId()))
            && (this.getMaintenanceDate() == null ? other.getMaintenanceDate() == null : this.getMaintenanceDate().equals(other.getMaintenanceDate()))
            && (this.getMaintenanceType() == null ? other.getMaintenanceType() == null : this.getMaintenanceType().equals(other.getMaintenanceType()))
            && (this.getMaintenanceContent() == null ? other.getMaintenanceContent() == null : this.getMaintenanceContent().equals(other.getMaintenanceContent()))
            && (this.getMaintenanceCost() == null ? other.getMaintenanceCost() == null : this.getMaintenanceCost().equals(other.getMaintenanceCost()))
            && (this.getMaintenanceCompany() == null ? other.getMaintenanceCompany() == null : this.getMaintenanceCompany().equals(other.getMaintenanceCompany()))
            && (this.getMaintenancePerson() == null ? other.getMaintenancePerson() == null : this.getMaintenancePerson().equals(other.getMaintenancePerson()))
            && (this.getMaintenanceResult() == null ? other.getMaintenanceResult() == null : this.getMaintenanceResult().equals(other.getMaintenanceResult()))
            && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRecordId() == null) ? 0 : getRecordId().hashCode());
        result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
        result = prime * result + ((getMaintenanceDate() == null) ? 0 : getMaintenanceDate().hashCode());
        result = prime * result + ((getMaintenanceType() == null) ? 0 : getMaintenanceType().hashCode());
        result = prime * result + ((getMaintenanceContent() == null) ? 0 : getMaintenanceContent().hashCode());
        result = prime * result + ((getMaintenanceCost() == null) ? 0 : getMaintenanceCost().hashCode());
        result = prime * result + ((getMaintenanceCompany() == null) ? 0 : getMaintenanceCompany().hashCode());
        result = prime * result + ((getMaintenancePerson() == null) ? 0 : getMaintenancePerson().hashCode());
        result = prime * result + ((getMaintenanceResult() == null) ? 0 : getMaintenanceResult().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", recordId=").append(recordId);
        sb.append(", deviceId=").append(deviceId);
        sb.append(", maintenanceDate=").append(maintenanceDate);
        sb.append(", maintenanceType=").append(maintenanceType);
        sb.append(", maintenanceContent=").append(maintenanceContent);
        sb.append(", maintenanceCost=").append(maintenanceCost);
        sb.append(", maintenanceCompany=").append(maintenanceCompany);
        sb.append(", maintenancePerson=").append(maintenancePerson);
        sb.append(", maintenanceResult=").append(maintenanceResult);
        sb.append(", remarks=").append(remarks);
        sb.append("]");
        return sb.toString();
    }
}